Now that we have the core game logic done, we need to look at the other little bits that go together to make a complete game, such as a scoring system and some way to know when the game is starting.

To handle scoring, we simply need to add a variable containing the score, reset it to zero at the start of a game and then increment it each time the player gets it right. When the game ends, we need to somehow display this score to the player, or just tell them that they got to the end of the sequence.

At the moment, we don't have any way to display numbers to the player in the normal decimal form, so we'll just have to display the score in binary and assume that they'll know what it means.

To handle the start of the game, we'll need to display some kind of pattern on the LEDs to tell the player that the game is going to start.Make a copy of the last exercise and have a go yourself, and then compare it to my version, located in Exercise 3.7 .